package com.css.dzj.dzjwgr.modules.appeal.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 投诉举报管理
 */
@Entity
@Table(name = "JG_WGR_TSJBGL", schema = "DZJWGR", catalog = "")
public class JgWgrTsjbglEntity {
    //唯一主键ID
    private String id;
    //投诉人
    private String name;
    //投诉时间
    private Date creatTime;
    //投诉状态: 0未处理，1已处理
    private String appealStatus;
    //投诉内容
    private String appealContent;
    //是否有附件
    private String commentCode;
    //附件
    private String commAttachment;
    //联系电话
    private String phone;
    //性别
    private String sex;
    //省市县
    private String province;
    private String cities;
    private String county;
    //违法活动记录
    private String records;
    //结束时间
    private Date endTime;
    //删除标记
    private String delStatus;
    //预留字段
    private String random;

    @Id
/*@GeneratedValue(generator = "idGenerator")*/
    /*@GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjwgr.common.util.SnowflakeId")*/
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "Creat_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    @Basic
    @Column(name = "Appeal_Status")
    public String getAppealStatus() {
        return appealStatus;
    }

    public void setAppealStatus(String appealStatus) {
        this.appealStatus = appealStatus;
    }

    @Basic
    @Column(name = "Appeal_Content")
    public String getAppealContent() {
        return appealContent;
    }

    public void setAppealContent(String appealContent) {
        this.appealContent = appealContent;
    }

    @Basic
    @Column(name = "comment_code")
    public String getCommentCode() {
        return commentCode;
    }

    public void setCommentCode(String commentCode) {
        this.commentCode = commentCode;
    }

    @Basic
    @Column(name = "comm_attachment")
    public String getCommAttachment() {
        return commAttachment;
    }

    public void setCommAttachment(String commAttachment) {
        this.commAttachment = commAttachment;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "Province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "Cities")
    public String getCities() {
        return cities;
    }

    public void setCities(String cities) {
        this.cities = cities;
    }

    @Basic
    @Column(name = "County")
    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    @Basic
    @Column(name = "Records")
    public String getRecords() {
        return records;
    }

    public void setRecords(String records) {
        this.records = records;
    }

    @Basic
    @Column(name = "end_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "del_Status")
    public String getDelStatus() {
        return delStatus;
    }

    public void setDelStatus(String delStatus) {
        this.delStatus = delStatus;
    }

    @Basic
    @Column(name = "Random")
    public String getRandom() {
        return random;
    }

    public void setRandom(String random) {
        this.random = random;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JgWgrTsjbglEntity that = (JgWgrTsjbglEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(name, that.name) &&
                Objects.equals(creatTime, that.creatTime) &&
                Objects.equals(appealStatus, that.appealStatus) &&
                Objects.equals(appealContent, that.appealContent) &&
                Objects.equals(commentCode, that.commentCode) &&
                Objects.equals(commAttachment, that.commAttachment) &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(province, that.province) &&
                Objects.equals(cities, that.cities) &&
                Objects.equals(county, that.county) &&
                Objects.equals(records, that.records) &&
                Objects.equals(endTime, that.endTime) &&
                Objects.equals(delStatus, that.delStatus) &&
                Objects.equals(random, that.random);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, creatTime, appealStatus, appealContent, commentCode, commAttachment, phone, sex, province, cities, county, records, endTime, delStatus, random);
    }
}
